<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<script src="jquery-1.11.1.min.js"></script>
	<style>
		*{
			margin: 0;
			padding: 0;
		}
		li{
			list-style: none;
		}
		#tabUl{
			width: 200px;
			height: 40px;
		}
		#tabUl li{
			width: 48px;
			height: 38px;
			line-height: 38px;
			border: 1px solid #ccc;
			float: left;
			text-align: center;
		}
		#tabUl .active{
			background: red;
		}
		#wrap{
			width: 198px;
			height: 298px;
			border: 1px solid #ccc;
		}
		#wrap div{
			width: 198px;
			height: 298px;
			display: none;
			text-align: center;
			line-height: 298px;
		}
		#wrap .show{
			display: block;
		}
	</style>
</head>
<body>
	<ul id="tabUl">
		<li class="active">1</li>
		<li>2</li>
		<li>3</li>
		<li>4</li>
	</ul>
	<div id="wrap">
		<div class="show">1</div>
		<div>2</div>
		<div>3</div>
		<div>4</div>
	</div>

	<script>
	$(function(){
		$("#tabUl li").click(function(){
			$("#tabUl li").removeClass("active");
			$(this).addClass("active");
			var index=$(this).index();

			$("#wrap div").removeClass("show");
			$("#wrap div").eq(index).addClass("show");
		})
		

	})
	</script>
</body>
</html>